#import "ChatTextView.h"
#import "ChatScrollView.h"

@implementation ChatTextView

- (id)initWithFrame:(NSRect)r {
	if(self = [super initWithFrame:r]) {
		rectLast =r;
	}
	return self;
}

- (void)setName:(NSString *)n {
///	[(ChatScrollView *)[self enclosingScrollView] setName:n];
}

- (void)animateName {
//	[(ChatScrollView *)[self enclosingScrollView] animateNameWithMaxAlpha:1.0];
}

- (void)animateNameWithMaxAlpha:(float)f {
//	[(ChatScrollView *)[self enclosingScrollView] animateNameWithMaxAlpha:f];
}


- (void)drawRect:(NSRect)rect {
	[super drawRect:rect];
	ChatScrollView *csv = (ChatScrollView *)[self enclosingScrollView];
//	[self drawNameWithRect:rectLast];
	[csv lockFocus];
	[csv drawName];//Rect:[csv frame]];
	[csv unlockFocus];
}

- (void)drawNameWithRect:(NSRect)rect {
	[super drawViewBackgroundInRect:rectLast];
	[super drawRect:rectLast];
	[super drawViewBackgroundInRect:rect];
	[super drawRect:rect];
	rectLast = rect;
}
	

@end
